package com.mtgdeckbuilder.server.transformer;

import com.mtgdeckbuilder.server.entity.Deck;
import com.mtgdeckbuilder.shared.dto.DeckDTO;

public class DeckTransformer {

   public static DeckDTO entityToDto(final Deck entity) {
      final DeckDTO dto = new DeckDTO();
      dto.setName(entity.getName());
      dto.setColor(entity.getColor());
      return dto;
   }

   public static Deck dtoToEntity(final DeckDTO dto) {
      final Deck entity = new Deck();
      entity.setName(dto.getName());
      entity.setColor(dto.getColor());
      return entity;
   }
}
